<%@ page contentType="text/html;charset=UTF-8" %>
<%@ include file="/WEB-INF/views/include/taglib.jsp"%>
<html>
<head>
	<title>送货员管理</title>
	<meta name="decorator" content="default"/>
	<script type="text/javascript">
		$(document).ready(function() {
			
		});
		function page(n,s){
			$("#pageNo").val(n);
			$("#pageSize").val(s);
			$("#searchForm").submit();
        	return false;
        }
	</script>
</head>
<body>
	<ul class="nav nav-tabs">
		<li class="active"><a href="${ctx}/ivm/deliverymember/stats">送货统计</a></li>
		<li><a href="${ctx}/ivm/deliverymember/list?type=1">送货员列表</a></li>
		<shiro:hasPermission name="ivm:deliverymember:edit"><li><a href="${ctx}/ivm/deliverymember/form?type=1">送货员添加</a></li></shiro:hasPermission>
	</ul>
	<form:form id="searchForm" action="${ctx}/ivm/deliverymember/stats" method="post" class="breadcrumb form-search">
		<input id="pageNo" name="pageNo" type="hidden" value="${page.pageNo}"/>
		<input id="pageSize" name="pageSize" type="hidden" value="${page.pageSize}"/>
		<label>日期 ：</label><input id="startDate" name="startDate" type="text" maxlength="50" class="input-small Wdate"
			onclick="WdatePicker({dateFmt:'yyyy-MM-dd',isShowClear:true,maxDate:'#F{$dp.$D(\'endDate\');}'});" value="${startDate }"/>
		 ~ <input id="endDate" name="endDate" type="text" maxlength="50" class="input-small Wdate"
			onclick="WdatePicker({dateFmt:'yyyy-MM-dd',isShowClear:true,minDate:'#F{$dp.$D(\'startDate\');}'});" value="${endDate }"/>
		&nbsp;<input id="btnSubmit" class="btn btn-primary" type="submit" value="查询"/>
	</form:form>
	<tags:message content="${message}"/>
	<!-- 统计 -->
	<div>
		总计<span style="color: red">${allMembers }</span>人　总计<span style="color: red">${allIndents }</span>单　日人均<span style="color: red">${avgIndents }</span>单
	</div>
	<table id="contentTable" class="table table-striped table-bordered table-condensed">
		<thead><tr><th>姓名</th><th>手机</th><th>天数</th><th>总计单数</th><th>日均单数</th></tr></thead>
		<tbody>
		<c:forEach items="${page.list}" var="stats">
			<tr>
				<td>${stats.memberName }</td>
				<td>${stats.phone }</td>
				<td>${stats.days }</td>
				<td>${stats.totalIndents }</td>
				<td>${stats.average }</td>
			</tr>
		</c:forEach>
		</tbody>
	</table>
</body>
</html>
